package com.jingding.procurement.web;

import lombok.Data;

import java.util.List;
@Data
public class PageResult<T> {
        private List<T> Items;          // 当前页码对应的结果集
        private int PageIndex;         // 页码
        private int PageSize;           // 每一页显示多少项
        private  long TotalCount;       //总条数
        private int TotalPages;         //总页码
        private boolean HasPreviousPage; //是否存在上一页
        private boolean HasNextPage;    //是否存在下一页


        public PageResult(List<T> list, int pageSize,int pageIndex,long totalCount,int totalPages,boolean hasPreviousPage,boolean hasNextPage) {
                Items = list;
                PageIndex = pageIndex;
                PageSize = pageSize;
                TotalCount = totalCount;
                TotalPages = totalPages;
                HasPreviousPage = hasPreviousPage;
                HasNextPage = hasNextPage;
        }
}
